package com.ruoyi.web.controller.loan.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.loan.service.AdminStudentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: 廖振辉
 * Date: 2022/4/4
 * Description: 管理员操作用户
 */
@Api(tags = "管理员操作用户")
@RequestMapping("admin")
@RestController
public class AdminStudentController {

    @Autowired
    private AdminStudentService adminStudentService;

    @ApiOperation(value = "重置学生密码,为身份证后9位",notes = "重置学生密码")
    @RequestMapping(value = "/resetStudentPassword",method = RequestMethod.POST)
    public AjaxResult resetStudentPassword(String idCard){
        adminStudentService.resetStudentPassword(idCard);
        return AjaxResult.success("已重置学生密码为身份证后9位");
    }
}
